import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: () => import( '../views/login.vue')
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import( '../views/home.vue')
  },
  {
    path: '/find',
    name: 'Find',
    component: () => import( '../views/find.vue')
  },
  {
    path: '/member',
    name: 'Member',
    component: () => import( '../views/member.vue')
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () => import( '../views/cart.vue')
  },
  {
    path: '/classify',
    name: 'Classify',
    component: () => import( '../views/classify.vue')
  },
  {
    path: '/dynamic',
    name: 'Dynamic',
    component: () => import( '../views/dynamic.vue')
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import( '../views/register.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import( '../views/login.vue')
  },
  {
    path: '/addressList',
    name: 'AddressList',
    component: () => import( '../views/addressList.vue')
  },
  {
    path: '/setting',
    name: 'Setting',
    component: () => import( '../views/setting.vue')
  },
  {
    path: '/goodDetail',
    name: 'goodDetail',
    component: () => import( '../views/goodDetail.vue')
  },
  {
    path: '/mainCategory',
    name: 'mainCategory',
    component: () => import( '../views/mainCategory.vue')
  },
  {
    path: '/myNotice',
    name: 'myNotice',
    component: () => import( '../views/myNotice.vue')
  },
  {
    path: '/searchGoods',
    name: 'searchGoods',
    component: () => import( '../views/searchGoods.vue')
  },
  {
    path: '/productOrder',
    name: 'productOrder',
    component: () => import( '../views/productOrder.vue')
  },
  // {
  //   path: '/admin/products',
  //   name: 'adminProducts',
  //   component: () => import( '../views/admin/products.vue')
  // }
]

const router = new VueRouter({
  linkActiveClass: 'active',
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
